package org.dylan.evernote;

import java.util.Date;

import com.evernote.edam.error.EDAMSystemException;
import com.evernote.edam.error.EDAMUserException;
import com.evernote.edam.type.Notebook;
import com.evernote.thrift.TException;

/**
 *
 *
 * @Copyright: Copyright (c) 2013 FFCS All Rights Reserved 
 * @Company: 北京福富软件有限公司 
 * @author 陈作朋 Oct 25, 2013
 * @version 1.00.00
 * @history:
 * 
 */
public class CreateNotebook {
	
	public static void createNotebook() throws EDAMUserException, EDAMSystemException, TException{
		EDAMContext context=new EDAMContext();
		Notebook notebook=new Notebook();
		notebook.setStack("stack-abc"); //组
		notebook.setName("nb-test-"+new Date().getTime());
		Notebook createdNotebook=context.getNoteStore().createNotebook(notebook);
		System.out.println("notebook guid:"+createdNotebook.getGuid());
	}

	public static void main(String[] args) throws EDAMUserException, EDAMSystemException, TException {
		createNotebook();
	}

}
